package com.hk.sell;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hk.action.Action;
import com.hk.action.ActionForward;
import com.hk.dtos.BBSDto;
import com.hk.service.BBSService;

public class AnswerAction implements Action{
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		
		ActionForward forword=new ActionForward();
		
		BBSService manager=BBSService.getInstance();
		BBSDto dto = new BBSDto();
		
		
	    String tseq = request.getParameter("seq");
	    int seq = Integer.parseInt(tseq);
	    BBSDto tdto = new BBSDto();
	    tdto.setSeq(seq);
	    tdto.setBbsname("SELLBBS");
	    dto=manager.getBoard(dto);
	    
	    
	
		request.setAttribute("board", dto);
		forword.setUrl("answerwritego");
		forword.setRedirect(false);
	
		return forword;
	
	}
}
